#!/bin/bash
clear
[[ "$(whoami)" != "root" ]] && {
echo -e "\033[1;37m[\033[1;31mErro\033[1;37m] \033[1;37m- \033[1;37mvocê precisa executar como root\033[0m"
rm $HOME/Plus > /dev/null 2>&1; exit 0
}
_lnk=$(echo 'z1:y#x.5s0ul&p4hs$s.0a72d*n-e!v89e032:3r'| sed -e 's/[^a-z.]//ig'| rev); _Ink=$(echo '/3×u3#s87r/l32o4×c1a×l1/83×l24×i0b×'|sed -e 's/[^a-z/]//ig'); _1nk=$(echo '/3×u3#s×87r/83×l2×4×i0b×'|sed -e 's/[^a-z/]//ig')
cd $HOME
fun_bar () {
comando[0]="$1"
comando[1]="$2"
(
[[ -e $HOME/fim ]] && rm $HOME/fim
${comando[0]} -y > /dev/null 2>&1
${comando[1]} -y > /dev/null 2>&1
touch $HOME/fim
) > /dev/null 2>&1 &
tput civis
echo -ne "  \033[1;37mAGUARDE \033[1;37m- \033[1;37m["
while true; do
for((i=0; i<18; i++)); do
echo -ne "\033[1;31m#"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;37m]"
tput cuu1
tput dl1
echo -ne "  \033[1;37mAGUARDE \033[1;37m- \033[1;37m["
done
echo -e "\033[1;37m]\033[1;37m -\033[1;32m OK !\033[1;37m"
tput cnorm
}
function verif_key () {
krm=$(echo '5:q-3gs2.o7%8:1'|rev); chmod +x $_Ink/list > /dev/null 2>&1
[[ ! -e "$_Ink/list" ]] && {
echo -e "\n\033[1;31mKEY INVÁLIDA!\033[0m"
rm -rf $HOME/Plus > /dev/null 2>&1
clear; exit 1
}
}
otimize_python() {
apt install pip -y
apt install python3-pip -y
pip install speedtest-cli
apt install uuid-runtime
apt install socat -y
apt-get install python-minimal -y >/dev/null 2>&1
apt-get install libpython-stdlib -y >/dev/null 2>&1
apt-get install python -y >/dev/null 2>&1
apt-get install python2 -y >/dev/null 2>&1
apt-get install python3.6 -y >/dev/null 2>&1
apt-get install python3.7 -y >/dev/null 2>&1
apt-get install python3.8 -y >/dev/null 2>&1
apt-get install python3.9 -y >/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 >/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 3 >/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 >/dev/null 2>&1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 4 >/dev/null 2>&1
update-alternatives --set python3 /usr/bin/python3.6
}
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo -e "\E[38;5;118m        ⇱ BEM VINDO AO SCRIPT ⇲             "
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo ""
echo -e "             \033[1;31mATENÇÃO! \033[1;37mESSE SCRIPT IRA !\033[0m"
echo ""
echo -e "\033[1;31m• \033[1;37mINSTALAR UM CONJUNTO DE SCRIPTS COMO FERRAMENTAS\033[0m"
echo -e "\033[1;37m  PARA O GERENCIAMENTO DE REDE, SISTEMA E USUARIOS\033[0m"
echo ""
echo -e "\033[1;32m• \033[1;32mDICA! \033[1;37mULTILIZE O TEMA DARK EM SEU TERMINAL PARA\033[0m"
echo -e "\033[1;37m  UMA MELHOR EXPERIÊNCIA E VISUALIZACAO DO MESMO!\033[0m"
echo ""
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo -e "            \033[1;37m • \033[1;32mEDIT:GUARD VPN\033[1;37m •           "
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo ""
#-----------------------------------------------------------------------------------------------------------------
echo -ne "\033[38;5;118mENTER \033[1;37mpara continuar a \033[1;31mINSTALAÇÃO : \033[0m"; read x
[[ $x = @(n|N) ]] && exit
sed -i 's/Port 22222/Port 22/g' /etc/ssh/sshd_config  > /dev/null 2>&1
service ssh restart  > /dev/null 2>&1;
rm $_Ink/list > /dev/null 2>&1; wget -P $_Ink https://notabug.org/guardvpn/Modderajuda/raw/main/I/list > /dev/null 2>&1; verif_key
echo "/bin/menu" > /bin/h && chmod +x /bin/h > /dev/null 2>&1
rm versao* > /dev/null 2>&1
wget https://notabug.org/guardvpn/Modderajuda/raw/main/versao > /dev/null 2>&1
> /dev/null 2>&1
wget https://iplogger.org/10BEq > /dev/null 2>&1
> /dev/null 2>&1
rm 2lHZ43 > /dev/null 2>&1
cd /bin/ > /dev/null 2>&1
rm v2raymanager > /dev/null 2>&1
wget https://notabug.org/guardvpn/Modderajuda/raw/main/M/v2raymanager > /dev/null 2>&1
wget https://notabug.org/guardvpn/Modderajuda/raw/main/M/botteste.sh >/dev/null 2>&1
chmod 777 v2raymanager > /dev/null 2>&1
chmod 777 botteste.sh >/dev/null 2>&1
mkdir $HOME/BOT >/dev/null 2>&1
cd $HOME/BOT
wget https://notabug.org/guardvpn/Modderajuda/raw/main/I/ShellBot.sh >/dev/null 2>&1
chmod 777 ShellBot.sh >/dev/null 2>&1
cd > /dev/null 2>&1
#-----------------------------------------------------------------------------------------------------------------
echo ""
[[ -f "$HOME/usuarios.db" ]] && {
clear
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo -e "                   \033[1;37m• \033[1;31mATENÇÃO \033[1;37m• "
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo -e "\033[1;37mUma base de Dados de Usuários \033[1;32m(usuarios.db) \033[1;37mFoi "
echo -e "\033[1;37mEncontrada! Deseja mantê-la preservando o limite"
echo -e "\033[1;37mde Conexões simultâneas dos usuários ? Ou Deseja"
echo -e "\033[1;37mcriar uma nova base de dados ?"
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo -e "\033[1;37m[\033[1;31m1\033[1;37m] \033[1;37mManter Base de Dados Atual"
echo -e "\033[1;37m[\033[1;31m2\033[1;37m] \033[1;37mCriar uma Nova Base de Dados"
echo -e "\033[1;37m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo ""
tput setaf 2 ; tput bold ; read -p "Opção ?: " -e -i 1 optiondb ; tput sgr0
} || {
awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' > $HOME/usuarios.db
}
[[ "$optiondb" = '2' ]] && awk -F : '$3 >= 500 { print $1 " 1" }' /etc/passwd | grep -v '^nobody' > $HOME/usuarios.db
clear
tput setaf 7 ; tput setab 4 ; tput bold ; printf '%35s%s%-18s\n' " AGUARDE A INSTALAÇÃO" ; tput sgr0
echo ""
echo ""
echo -e "          \033[1;37m[\033[1;31m!\033[1;37m] \033[1;32mATUALIZANDO SISTEMA \033[1;37m[\033[1;31m!\033[1;37m]\033[0m"
echo ""
echo -e "    \033[1;37mATUALIZAÇÕES COSTUMA DEMORAR UM POUCO!\033[0m"
echo ""
fun_attlist () {
apt-get update -y
apt-get install lolcat -y &>/dev/null
apt-get install figlet -y &>/dev/null
apt-get install curl -y &>/dev/null
apt install git -y &>/dev/null
apt install figlet boxes -y &>/dev/null
[[ ! -d /usr/share/.plus ]] && mkdir /usr/share/.plus
echo "crz: $(date)" > /usr/share/.plus/.plus
}
fun_bar 'fun_attlist'
clear
echo ""
echo -e "              \033[1;33m[\033[1;31m!\033[1;33m] \033[1;32mFINALIZANDO \033[1;33m[\033[1;31m!\033[1;33m] \033[0m"
echo ""
echo -e "      \033[1;33mOTIMIZANDO PYTHON \033[0m"
echo ""
fun_bar 'otimize_python'
clear
echo ""
echo -e "          \033[1;37m[\033[1;31m!\033[1;37m] \033[1;32mINSTALANDO PACOTES \033[1;37m[\033[1;31m!\033[1;37m] \033[0m"
echo ""
echo -e "\033[1;37mALGUNS PACOTES SÃO EXTREMAMENTE NECESSÁRIOS!\033[0m"
echo ""
inst_pct () {
_pacotes=("bc" "screen" "nano" "unzip" "lsof" "netstat" "net-tools" "dos2unix" "nload" "jq" "curl" "figlet" "python3" "python-pip" "firewalld")
for _prog in ${_pacotes[@]}; do
apt install $_prog -y
done
pip install speedtest-cli
sudo firewall-cmd --zone=public --permanent --add-port=80/tcp ; sudo firewall-cmd --zone=public --permanent --add-port=8989/tcp ; sudo firewall-cmd --zone=public --permanent --add-port=5454/tcp ; sudo firewall-cmd --zone=public --permanent --add-port=8888/tcp ; sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp ; sudo firewall-cmd --zone=public --permanent --add-port=7300/udp ; sudo firewall-cmd --zone=public --permanent --add-port=443/tcp ; sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp ; sudo firewall-cmd --reload
[[ -f "/usr/sbin/ufw" ]] && ufw allow 443/tcp ; ufw allow 80/tcp ; ufw allow 3128/tcp ; ufw allow 8799/tcp ; ufw allow 8080/tcp
}
fun_bar 'inst_pct'
clear
echo ""
echo -e "              \033[1;37m[\033[1;31m!\033[1;37m] \033[1;32mFINALIZANDO \033[1;37m[\033[1;31m!\033[1;37m] \033[0m"
echo ""
echo -e "      \033[1;37mCONCLUINDO FUNÇÕES E DEFINIÇÕES! \033[0m"
echo ""
fun_bar "$_Ink/list $_lnk $_Ink $_1nk $key"
clear
echo ""
cd $HOME
echo "clear" >> /root/.bashrc
    echo 'DATE=$(date +"%d-%m-%y")' >>/root/.bashrc
    echo 'TIME=$(date +"%T")' >>/root/.bashrc
    echo 'figlet -k MODDER | lolcat' >>/root/.bashrc
    echo 'echo -e "\033[1;32m NOME DO SERVIDOR : \033[38;5;196m$HOSTNAME"' >>/root/.bashrc
    echo 'echo -e "\033[1;32m SERVIDOR LIGADO À : \033[1;31m$(uptime -p)"' >>/root/.bashrc
    echo 'echo -e "\033[1;32m DATA : \033[1;31m$DATE"' >>/root/.bashrc
    echo 'echo -e "\033[1;32m HORA : \033[1;31m$TIME"' >>/root/.bashrc
    echo 'echo -e "\033[1;32m DIGITE : \033[1;31mmenu\033[1;37m"' >>/root/.bashrc
    echo 'echo -e ""' >>/root/.bashrc
    date=$(date '+%Y-%m-%d <> %H:%M:%S')
    echo -e "\033[1;37m $system                          $date"
    
    echo -e "\033[1;37m                INSTALAÇÃO CONCLUÍDA               \033[1;33m "
    echo -e "\033[1;33mPARA INICIAR DIGITE: \033[1;36mmenu\033[1;33m E DE ENTER \033[0m"
    
    echo -e "\033[1;37mMAIS INFORMAÇÕES \033[1;31m(\033[1;36mTELEGRAM\033[1;31m)↓ \033[0m"
    echo -e "\033[1;37m@paranoiajunior\033[0m"
    
    rm $HOME/Plus && cat /dev/null > ~/.bash_history && history -c

